package com.jsyl.lwbk.business.mapper;

import com.jsyl.lwbk.business.domain.TrainPackageProject;
import com.jsyl.lwbk.business.dto.TrainPackageProjectDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Fitch
 * 2022/2/21
 */
public interface TrainPackageProjectMapper {
    /**
     * 根据训练包获取题目库list
     * @param trainPackageId
     * @return
     */
    List<TrainPackageProjectDTO> findList(@Param("trainPackageId")Long trainPackageId);

    /**
     * 根据训练包获取题目库list
     * @param trainPackageId
     * @return
     */
    List<TrainPackageProjectDTO> findListByClass(@Param("trainPackageId")Long trainPackageId,
                                          @Param("classId")Long classId);

    /**
     * 更新
     * @param trainPackage
     * @return
     */
    int update(TrainPackageProject trainPackage);

    /**
     * 新增
     * @param trainPackage
     * @return
     */
    int insert(TrainPackageProject trainPackage);

    int deleteById(@Param("id")String id);

    TrainPackageProject getById(@Param("id") Long id);

}
